
//手机号
$(".userpho").blur(checkuserpho);
function checkuserpho(){
    var userpho =$(".userpho").val()

    if(userpho =="" || userpho ==null){
        $(".userphoTip").text("手机号不能为空")
        return false;
    }else if(!/^[0-9]\w{5,11}$/.test(userpho)){
        $(".userphoTip").text("手机号格式不对")
        return false;
    }else{
        $(".userphoTip").text("");
        return true;
    }
}




$(".useremail").blur(checkUseremail);
function checkUseremail(){
    var useremail =$(".useremail").val()

    if(useremail == "" || useremail ==null){
        $(".useremailTip").text("用户名不能为空！")
        return false;
    } else{
        $(".useremailTip").text("");
        return true;
    }
}

//验证密码
$(".userpwd").blur(checkuserpwd);
function checkuserpwd(){
    var userpwd =$(".userpwd").val()

    if(userpwd =="" || userpwd ==null){
        $(".userpwdTip").text("密码不能为空")
        return false;
    }else if(!/^[0-9]{3}$/.test(userpwd)){
        $(".userpwdTip").text("")
        return true;
    }else{
        $(".userpwdTip").text("");
        return true;
    }
}


$( " .submitBtn").click(function(){
    var userpho =$( ".userpho").val();
    var userpwd =$(".userpwd" ).val();
    var useremail =$(".useremail").val();

    console.log("userpho:" + userpho)
    console.log ( "userpwd:" + userpwd)
    console.log ( "useremail:" + useremail)
    return false;
})

